const mongoose = require('mongoose')
const Schema = mongoose.Schema
mongoose.connect('mongodb://localhost:27017/user')

var topicSchema = new Schema({
  title: { type: String, required: true },
  msg: { type: String, required: true },
  username: { type: String },
  datetime: { type: String },
  delBtn: { type: Boolean, default: false }
})

module.exports = mongoose.model('Topic', topicSchema)